home *** CD-ROM | disk | FTP | other *** search
/ Inside Mac Games Volume 3 #11 / IMG 32 Nov 1995.iso / Shareware / 32-bit World Builder / World Builder Info / Getting Started < prev    next >
Encoding:
Text File  |  1995-08-07  |  10.5 KB  |  194 lines  |  [TEXT/ttxt]

  1. Written by     RayDunakin@aol.com
  2.  
  3. World Builder was first released in 1986. Publication was discontinued a few years later, and for several years the program was out of print and unavaible. On August 7, 1995 Bill Appleton, the creater of World Builder, released it to the public domain. The version that I have posted with these files has been converted by me to be 32-bit compatible. This means it will run on any Mac, and so will the games you create with it. However, due to changes in the sound handling hardware, the sounds do not work on AV Macs or PowerMacs. 
  4.  
  5. This file should include the World Builder application, the World Template, Sound Converter, and a sample sound library. I've also written a few text files to help you use WB to it's fullest. If you distribute these files, please keep them together.
  6.  
  7. -------------------------------------------------------
  8. To get started making a game using World Builder, first make a duplicate of the World Template. Rename it. Then open it with World Builder. Use the buttons to create and edit scenes, characters, and objects. Sounds can be copied one at a time from a sound library and then pasted into the sound file of a game. Or you can make a seperate sound library for each game. Just enter the name of the sound library in the World Data. 
  9.  
  10. You can also make your own sounds using MacRecorder or other recording device. Save the sounds in the SoundEdit format, then use Sound Converter to convert them to WB sound format.
  11.  
  12. Objects can be movable or immovable. Immovable objects allow you to make clickable objects, simple animation, etc. They can only be moved according to the scene or global code. Movable objects are things that the player can pick up by just clicking on them, and are automatically included in the player's inventory.
  13.  
  14. Characters are controlled by the computer (except the player character). You can adjust various data in the Character Data to influence the character's behavior. However, for most advanced games you should use Objects to represent characters, and write scene code to control their actions and dialogue.
  15.  
  16. The Scene Data allows you to choose which directions are blocked and which are open in each scene. Additional movement can be written into the scene code. Scene code controls the action in a scene, unless it is handled by the Global Code. 
  17.  
  18. I recommend making one scene, then adjusting the size of the text window so that is is as tall as the scene window. You might also wish to make the text window a little wider, so that it touches the edge of the scene window. This will give you more room for text, and presents a cleaner appearance too. Then copy the scene, and paste it repeatedly until you have as many blank scenes as you want. After this you can do the drawings, text and programming for each scene while maintaining a standard window size throughout your game. 
  19.  
  20. You can open other World Builder games with World Builder, and examine their code to see how it is done. I strongly recommend that you study the code in "A Mess O'Trouble" since it has the cleanest, most advanced code available at this time. In addition, I've enclosed some text files discussing WB programming that take you step by step through entire scene codes. And there is also a couple of files that deal with the creative process of designing and writing adventure games.
  21.  
  22. For more info on WB programming and adventure game creation, check out my columns in The Shareware Review. 
  23.  
  24. -----------------------------------------------------------
  25.                WB Programming Code
  26.  
  27. Text Variables:
  28.  
  29. CLICK$=(The name of the object or character the player clicked on)
  30. TEXT$=(The command the player typed in or selected from the Command menu)
  31.  
  32. -----------------------------------------------------------
  33. Numeric Variables:
  34.  
  35. LOOP#   (The number of commands the player has given in the current scene)
  36. RANDOM#   (A random number between 1 and 100)
  37. VICTORY#   (The number of Characters killed)
  38. VISITS#   (The number of scenes the player has visited, including repeated visits)
  39.  
  40. PHYS.ACC.BAS#  (The base physical accuracy of the player)
  41. PHYS.ACC.CUR#   (The current physical accuracy of the player)
  42. PHYS.ARM.BAS#   (The base physical armor of the player)
  43. PHYS.ARM.CUR#   (The current physical armor of the player)
  44. PHYS.HIT.BAS#   (The base physical hit points of the player)
  45. PHYS.HIT.CUR#   (The current physical hit points of the player)
  46.  
  47. PHYS.SPE.BAS#  (The base physical speed of the player)
  48. PHYS.SPE.CUR#   (The current physical speed of the player)
  49. PHYS.STR.BAS#   (The base physical strength of the player)
  50. PHYS.STR.CUR#   (The current physical strength of the player)
  51.  
  52. SPIR.ACC.BAS#  (The base spiritual accuracy of the player)
  53. SPIR.ACC.CUR#   (The current spiritual accuracy of the player)
  54. SPIR.ARM.BAS#   (The base spiritual armor of the player)
  55. SPIR.ARM.CUR#   (The current spiritual armor of the player)
  56. SPIR.HIT.BAS#   (The base spiritual hit points of the player)
  57. SPIR.HIT.CUR#   (The current spiritual hit points of the player)
  58.  
  59. SPIR.SPE.BAS#  (The base spiritual speed of the player)
  60. SPIR.SPE.CUR#   (The current spiritual speed of the player)
  61. SPIR.STR.BAS#   (The base spiritual strength of the player)
  62. SPIR.STR.CUR#   (The current spiritual strength of the player)
  63.  
  64. -----------------------------------------------------------
  65. World Variables:
  66.  
  67. PLAYER@   (The player character)
  68. MONSTER@   (The non-player character currently in the scene, if any)
  69. RANDOMCHR@   (A randomly selected character)    <this is pretty useless
  70. RANDOMOBJ@   (A randomly selected object)     <this is pretty useless too
  71. RANDOMSCN@   (A randomly selected scene)   <You can move a player to a random scene this way.
  72. STORAGE@   (A sort of invisible room where objects and characters are stored when not in use. To make the player die, or end the game, move the player to STORAGE@)
  73.  
  74. -----------------------------------------------------------
  75. Conditional Statements:
  76.  
  77. IF/THEN statements allow you to determine what is happening, and what the response will be. Write them like this:
  78.  
  79. IF{TEXT$=UP}OR{TEXT$=CLIMB}THEN  
  80.     MOVE{PLAYER@}TO{UPPER ROOM}
  81. EXIT
  82.  
  83. You can nest one or more statements, like this:
  84.  
  85. IF{TEXT$=UP}OR{TEXT$=CLIMB}THEN
  86.     IF{CLIFF.ROPE=SCENE@}THEN
  87.         MOVE{PLAYER@}TO{LEDGE}
  88.     EXIT
  89.     PRINT{The cliff is too steep to climb.}
  90. EXIT
  91.  
  92. -----------------------------------------------------------   
  93. Everytime the player enters a command or mouse click, the program goes through the scene code to see if something must be done. When it encounters a conditional statement that is true, it does whatever is required in that part of the code. Each statement must be followed with either EXIT or END. The word EXIT stops the program right there. The word END means that this particular statement is finished, but allows the program to continue through the rest of the scene code to see if anything else has to be done. After going through the scene code, if it hasn't been stopped by an EXIT, then the program continues on to the Global code, where it checks for any other conditions that must be acted on.
  94.  
  95.  You can use EXIT or END wherever needed, such as this example:
  96.  
  97. IF{TEXT$=UP}OR{TEXT$=CLIMB}THEN
  98.     IF{SECRET.LADDER=SCENE@}THEN
  99.         MOVE{PLAYER@}TO{HIDEOUT}
  100.     EXIT
  101. END
  102.  
  103. In this case, if the secret ladder hasn't been found when the player tries to go up, then the program passes this statement and goes to the global code. In the global code you'd have a standard response:
  104.  
  105. IF{TEXT$=UP}OR{TEXT$=CLIMB}THEN
  106.     PRINT{You can't go up here.}
  107. EXIT
  108.  
  109. -----------------------------------------------------------
  110. Please note that you can use AND or OR to connect conditions in a statement. But you can't use both AND and OR in the same statement. For example, you can do this:
  111.  
  112. IF{TEXT$=SHOOT}AND{PISTOL=PLAYER@}THEN
  113.     IF{THING.1=SCENE@}OR{THING.2=SCENE@}THEN
  114.         SOUND{GUNSHOT}
  115.         PRINT{Your bullets bounce off the creature without harming it!}
  116.     EXIT
  117. END
  118.  
  119. But you can't do this:
  120.  
  121. IF{TEXT$=SHOOT}AND{PISTOL=PLAYER@}OR{TOMMYGUN=PLAYER@}THEN
  122.  
  123. -----------------------------------------------------------
  124. In the several of the examples above, you can see how to display text in the text window. Playing sounds or moving characters or objects is handled similarly:
  125.  
  126. SOUND{BOOM.1}       ("BOOM.1" is just an example. You can enter the name of whatever sound you            
  127.                                 want to play.)
  128.  
  129. MOVE{OPENDOOR.1}TO{SCENE@}
  130.  
  131. MOVE{BLANKET}TO{BEDROOM}
  132.  
  133. MOVE{GARGOYLE}TO{DUNGEON}
  134.  
  135. MOVE{PLAYER@}TO{STORAGE@}
  136.  
  137. -----------------------------------------------------------
  138. User Variables:
  139.  
  140. There are 234 User Variables. These are numbers that the programmer can use to keep track of events, etc. They are A1# through A9#, B1# through B9#, etc, continuing through the alphabet. Keep track of which variables you use in your game! If you accidently use the same variable for two different things, it will cause things to go wrong in your game, and it can be a real pain to try to track down this kind of problem. I've included a list of all User Variables that you can print out, to help you keep track of them. Just make a note next to each variable that you use, telling what it was used for, or which scene it was used in.
  141.  
  142. Also, variable B4# is bad. This is a bug in the program. Don't use it.
  143.  
  144. -----------------------------------------------------------
  145. To set a variable, do this:
  146.  
  147. LET{A1#=1}              (Each variable can equal any whole number. One is just an example.)
  148.  
  149. This can be part of an IF/THEN statement:
  150.  
  151. IF{TEXT$=DRINK}THEN
  152.     LET{W1#=95}
  153.     PRINT{The water quenches your thirst.}
  154. EXIT
  155.  
  156.  
  157. -----------------------------------------------------------
  158. At the beginning of a game, all User Variables are at less than one, NOT zero. So if you want to know whether the player has taken a certain action, write your code like this:
  159.  
  160. IF{M4#<1}THEN
  161.  
  162. not like this:
  163.  
  164. IF{M4#=0}THEN
  165.  
  166. -----------------------------------------------------------
  167. There are several other ways to set a variable:
  168.  
  169. LET{A1#=A1#=1}       (This is a counter. You can use this as part of a statement, so that it adds up every time the player does a certain action. Or use it by itself, and it will add a point everytime the player makes any actions in a scene.)
  170.  
  171. LET{A1#=A1#-1}     (Same as above, except it is counting down instead of up.)
  172.  
  173. LET{A1#=H4#}     (You can pass the amount of one variable to another variable.)
  174.  
  175. LET{A1#=B1#+B2#}    (You can set one variable to the sum of two other variables.)
  176.  
  177. LET{A1#=RANDOM#}    (You can set a variable to a random number between 1 and 100.)
  178.  
  179.  
  180. -----------------------------------------------------------
  181.  
  182. If you have any questions about WB programming, I can be reached via email at RayDunakin@aol.com
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.